Skip to content

Reset peak memory usage for controllers executing multiple unrelated tasks#6257

Merged
dtdesign merged 2 commits intoWoltLab:6.1from
TimWolla:memory-reset-peak-usage
Mar 28, 2025
Merged

Reset peak memory usage for controllers executing multiple unrelated tasks#6257
dtdesign merged 2 commits intoWoltLab:6.1from
TimWolla:memory-reset-peak-usage

Conversation

@TimWolla
Copy link
Copy Markdown
Member

No description provided.

This is specifically implemented in the controller instead of the
BackgroundQueueHandler, since the controller only has a single purpose:
Executing multiple different and a-priori unknown jobs. Measuring the peak
memory usage of the entire request is not useful there.

For other, user-facing, controllers the peak memory usage of an entire request
is more meaningful, since they also perform other tasks besides executing
background jobs. Thus we do not perform the reset in a generic location.
…cuteCronjobs()

The same reasoning as with the background jobs applies. The `executeCronjobs()`
method is the method that performs several a-priori unknown cronjobs and is
only used for purpose-built controllers.
@dtdesign dtdesign self-requested a review March 27, 2025 18:17
@dtdesign dtdesign merged commit 55e3625 into WoltLab:6.1 Mar 28, 2025
7 of 8 checks passed
@TimWolla TimWolla deleted the memory-reset-peak-usage branch March 31, 2025 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants